const mongoose = require('mongoose');
// 创建Schema对象
const Schema = mongoose.Schema
var schema = new Schema({
    categories: [{ type: mongoose.SchemaTypes.ObjectId, ref: "Category" }],
    title: { type: String },
    body: { type: String },
},{
    // 添加时间字段
    timestamps:true
});

module.exports = mongoose.model('Article', schema);